<template>
<div>
  <table border="1" cellspacing="0" align="center">
    <tr>
      <td>老师姓名</td>
      <td>老师密码</td>
    </tr>
    <tr v-for="i in teachlist">
      <td>{{i.username}}</td>
      <td>{{i.password}}</td>
    </tr>
  </table>
</div>
</template>

<script>
export default {
  name: "teacher_show",
  data(){
    return{
      teachlist:{}
    }
  },
  methods:{
    get_teachlist(){
      this.$axios.get('users/teacherm/')
      .then(res=>{
        this.teachlist=res.data.list
      })
    },
  },
  mounted() {
    this.get_teachlist()
  }
}
</script>

<style scoped>

</style>
